#include <adcatch.hpp>
#include <rc.hpp>
#include <settings.hpp>

Rc::Rc()
{
}

Rc::~Rc()
{
}

void Rc::Init()
{
}

void Rc::RunImpl(msg_rc_raw_s* rc_raw)
{
	if (rc_raw == nullptr)
	{
		return;
	}

	uint16_t adc[4]		= { 0, 0, 0, 0 };
	uint16_t adc_chs[4] = { 1, 2, 3, 4 };
	for (int i = 0; i < 4; i++)
	{
		ADCatch::Instance()->RunImpl(adc[i], E_ADC1, adc_chs[i]);
		rc_raw->rc_raw[i] = adc[i];
	}
}